﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;

namespace BVVD_Website
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BVVDDataContext db = new BVVDDataContext();
                List<LST_HOCVIEN> hv = (from li in db.LST_HOCVIENs
                                        select li).ToList();
                RadSearchBox1.DataSource = hv;
                RadSearchBox1.DataTextField = "TENHV";
                RadSearchBox1.DataValueField = "MAHV";
            }
            
        }

        protected void RadSearchBox1_DataSourceSelect(object sender, Telerik.Web.UI.SearchBoxDataSourceSelectEventArgs e)
        {
            BVVDDataContext db = new BVVDDataContext();
            List<LST_HOCVIEN> hv = (from li in db.LST_HOCVIENs
                                    select li).ToList();
            RadSearchBox1.DataSource = hv;
        }
    }
}